<div class="cluster-nodes">
    <div class="row">
        <div class="col-md-12">
            <eshq-cluster-navigation></eshq-cluster-navigation>
        </div>
    </div>

    <div class="row">
        <div class="col-md-2">
                <!--<span>Select which graph to view: </span>-->
                <div class="btn-group select-graphs-btn-group" uib-dropdown is-open="cNodesCtrl.selectGraphOpen">
                    <button id="select-graph-group" type="button" class="btn btn-info" uib-dropdown-toggle ng-disabled="!cNodesCtrl.groupedGraphs">
                        {{cNodesCtrl.selectedGraph.label}} <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="select-graph-group">
                        <li role="menuitem" ng-repeat="grp in cNodesCtrl.groupedGraphs">
                            <a href ng-click="cNodesCtrl.selectedGraph = grp">{{grp.label}}</a>
                        </li>
                    </ul>
                </div>
        </div>
        <div class="col-md-10">
            <div class="pull-right">

                <a href ng-click="value.active = !value.active" class="legend-item"
                   ng-repeat="(key, value) in cNodesCtrl._nodes">

                    <span><i class="fa" ng-class="!!value.active ? 'fa-circle' : 'fa-circle-o'"
                             ng-style="{color: value.color}"></i> {{key}}</span>
                </a>
            </div>
        </div>
    </div>
    <div class="row" ng-repeat="grp in cNodesCtrl.selectedGraph.graphs track by $index" ng-init="grpIndex = $index">
        <div class="col-md-6" ng-repeat="graph in grp track by $index" ng-init="graphIndex = $index">
            <eshq-cluster-nodes-line-graph data="cNodesCtrl._nodes"
                    allow-rendering="cNodesCtrl.allow_rendering"
                key="graph.key"
                num-format="graph.numFormat"
                header="graph.header"></eshq-cluster-nodes-line-graph>
        </div>
    </div>
</div>